/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author dvasquez
 */
@Embeddable
public class NroMoldesPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "nroMolde")
    private int nroMolde;
    @Basic(optional = false)
    @Column(name = "ID")
    private int id;

    public NroMoldesPK() {
    }

    public NroMoldesPK(int nroMolde, int id) {
        this.nroMolde = nroMolde;
        this.id = id;
    }

    public int getNroMolde() {
        return nroMolde;
    }

    public void setNroMolde(int nroMolde) {
        this.nroMolde = nroMolde;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) nroMolde;
        hash += (int) id;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NroMoldesPK)) {
            return false;
        }
        NroMoldesPK other = (NroMoldesPK) object;
        if (this.nroMolde != other.nroMolde) {
            return false;
        }
        if (this.id != other.id) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "" + nroMolde + "";
    }

}
